<%@ Page Language="C#" MasterPageFile="~/admin/admin.master" AutoEventWireup="true" CodeFile="EditPlaces.aspx.cs" Inherits="admin_EditPlaces" Title="Edit Places" %>
<asp:Content ID="Content1" ContentPlaceHolderID="LinkPlaceHolder" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table style="margin:10px">
    <tr>
    <td valign="top">
    Place Tag 1:<br />
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
        AutoGenerateColumns="False" DataKeyNames="id" DataSourceID="ObjectDataSource1">
        <Columns>
            <asp:CommandField ShowEditButton="True" />
            <asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" ReadOnly="True"
                SortExpression="id" />
            <asp:BoundField DataField="cat_name" HeaderText="cat_name" SortExpression="cat_name" />
            <asp:BoundField DataField="cat_des" HeaderText="cat_des" SortExpression="cat_des" />
            <asp:BoundField DataField="cat_parent" HeaderText="cat_parent" SortExpression="cat_parent" />
            <asp:CommandField ShowSelectButton="True" />
        </Columns>
    </asp:GridView>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete"
        InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetCatByParent"
        TypeName="dst_pbTableAdapters.pb_catTableAdapter" UpdateMethod="Update">
        <DeleteParameters>
            <asp:Parameter Name="Original_id" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="cat_name" Type="String" />
            <asp:Parameter Name="cat_des" Type="String" />
            <asp:Parameter Name="cat_parent" Type="Int32" />
            <asp:Parameter Name="Original_id" Type="Int32" />
        </UpdateParameters>
        <SelectParameters>
            <asp:Parameter DefaultValue="2" Name="catparent" Type="Int32" />
        </SelectParameters>
        <InsertParameters>
            <asp:Parameter Name="cat_name" Type="String" />
            <asp:Parameter Name="cat_des" Type="String" />
            <asp:Parameter Name="cat_parent" Type="Int32" />
        </InsertParameters>
    </asp:ObjectDataSource>
    <br />
    Place Tag 2:&nbsp;<asp:GridView ID="GridView2" runat="server" AllowPaging="True" AllowSorting="True"
        AutoGenerateColumns="False" DataKeyNames="id" DataSourceID="ObjectDataSource2">
        <Columns>
            <asp:CommandField ShowEditButton="True" />
            <asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" ReadOnly="True"
                SortExpression="id" />
            <asp:BoundField DataField="cat_name" HeaderText="cat_name" SortExpression="cat_name" />
            <asp:BoundField DataField="cat_des" HeaderText="cat_des" SortExpression="cat_des" />
            <asp:BoundField DataField="cat_parent" HeaderText="cat_parent" SortExpression="cat_parent" />
        </Columns>
    </asp:GridView>
    <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" DeleteMethod="Delete"
        InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetCatByParent"
        TypeName="dst_pbTableAdapters.pb_catTableAdapter" UpdateMethod="Update">
        <DeleteParameters>
            <asp:Parameter Name="Original_id" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="cat_name" Type="String" />
            <asp:Parameter Name="cat_des" Type="String" />
            <asp:Parameter Name="cat_parent" Type="Int32" />
            <asp:Parameter Name="Original_id" Type="Int32" />
        </UpdateParameters>
        <SelectParameters>
            <asp:ControlParameter ControlID="GridView1" DefaultValue="-1" Name="catparent" PropertyName="SelectedValue"
                Type="Int32" />
        </SelectParameters>
        <InsertParameters>
            <asp:Parameter Name="cat_name" Type="String" />
            <asp:Parameter Name="cat_des" Type="String" />
            <asp:Parameter Name="cat_parent" Type="Int32" />
        </InsertParameters>
    </asp:ObjectDataSource>
    </td>
    <td valign="top">
    Type Tag:<br />
    <asp:GridView ID="GridView3" runat="server" AllowPaging="True" AllowSorting="True"
        AutoGenerateColumns="False" DataKeyNames="id" DataSourceID="ObjectDataSource3">
        <Columns>
            <asp:CommandField ShowEditButton="True" />
            <asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" ReadOnly="True"
                SortExpression="id" />
            <asp:BoundField DataField="cat_name" HeaderText="cat_name" SortExpression="cat_name" />
            <asp:BoundField DataField="cat_des" HeaderText="cat_des" SortExpression="cat_des" />
            <asp:BoundField DataField="cat_parent" HeaderText="cat_parent" SortExpression="cat_parent" />
        </Columns>
    </asp:GridView>
    <asp:ObjectDataSource ID="ObjectDataSource3" runat="server" DeleteMethod="Delete"
        InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetCatByParent"
        TypeName="dst_pbTableAdapters.pb_catTableAdapter" UpdateMethod="Update">
        <DeleteParameters>
            <asp:Parameter Name="Original_id" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="cat_name" Type="String" />
            <asp:Parameter Name="cat_des" Type="String" />
            <asp:Parameter Name="cat_parent" Type="Int32" />
            <asp:Parameter Name="Original_id" Type="Int32" />
        </UpdateParameters>
        <SelectParameters>
            <asp:Parameter DefaultValue="1" Name="catparent" Type="Int32" />
        </SelectParameters>
        <InsertParameters>
            <asp:Parameter Name="cat_name" Type="String" />
            <asp:Parameter Name="cat_des" Type="String" />
            <asp:Parameter Name="cat_parent" Type="Int32" />
        </InsertParameters>
    </asp:ObjectDataSource>
    <br />
    <br />
    Insert Tag:&nbsp;<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False"
        DataKeyNames="id" DataSourceID="ObjectDataSource1" DefaultMode="Insert" Height="50px"
        Width="125px">
        <Fields>
            <asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" ReadOnly="True"
                SortExpression="id" />
            <asp:BoundField DataField="cat_name" HeaderText="Name" SortExpression="cat_name" />
            <asp:BoundField DataField="cat_parent" HeaderText="Parent id" SortExpression="cat_parent" />
            <asp:TemplateField HeaderText="Description">
                <ItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Height="65px" Text='<%# Bind("cat_des", "{0}") %>'
                        TextMode="MultiLine" Width="216px"></asp:TextBox>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:CommandField ShowInsertButton="True" />
        </Fields>
    </asp:DetailsView>
        <br />
        Insert Post2Tag<br />
        <asp:DetailsView ID="DetailsView2" runat="server" AutoGenerateRows="False" DataKeyNames="id"
            DataSourceID="ObjectDataSource4" DefaultMode="Insert" Height="50px" Width="125px">
            <Fields>
                <asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" ReadOnly="True"
                    SortExpression="id" />
                <asp:BoundField DataField="post_id" HeaderText="post_id" SortExpression="post_id" />
                <asp:BoundField DataField="cat_id" HeaderText="cat_id" SortExpression="cat_id" />
                <asp:CommandField ShowInsertButton="True" />
            </Fields>
        </asp:DetailsView>
        <asp:ObjectDataSource ID="ObjectDataSource4" runat="server" DeleteMethod="Delete"
            InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetPost2CatData"
            TypeName="dst_pbTableAdapters.pb_post2catTableAdapter" UpdateMethod="Update">
            <DeleteParameters>
                <asp:Parameter Name="Original_id" Type="Int32" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="post_id" Type="Int32" />
                <asp:Parameter Name="cat_id" Type="Int32" />
                <asp:Parameter Name="Original_id" Type="Int32" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="post_id" Type="Int32" />
                <asp:Parameter Name="cat_id" Type="Int32" />
            </InsertParameters>
        </asp:ObjectDataSource>
    </td>
    </tr>
    </table>
    
    
    <br />
    
    <br />
</asp:Content>

